<template>
	<view class="router-view bcl-white">
		<youxue-city :scroll-top="scrollTop" :select="onSelect"></youxue-city>
	</view>
</template>

<script>
	import youxueCity from "@/components/city";

	export default {
		data() {
			return {
				scrollTop: 0,
			};
		},

		onLoad(options) {
			uni.setNavigationBarTitle({
				title: options.title,
			});
	
		},

		onPageScroll(event) {
			this.scrollTop = event.scrollTop;
		},

		methods: {
			onSelect(content) {
				this.$store.dispatch('SET_CITY',content);
				uni.navigateBack();
			},
		},

		components: {
			youxueCity,
		},
	};
</script>

<style lang="scss" scoped></style>
